<script>
export default {
  onLaunch: function () {
    console.log("App Launch");
  },
  onShow: function () {
    console.log("App Show");
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
// 全局样式
.goods-list {
  .goods-item {
    display: flex;
    padding: 20rpx;
    border-bottom: 1px solid #ddd;
    .goods-image {
      width: 190rpx;
      height: 190rpx;
    }
    .goods-info {
      flex: 1;
      font-size: 24rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding: 0px 10px;
      .goods-name {
        // 多行超出隐藏
        overflow: hidden;
        -webkit-line-clamp: 2;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
      }
      .goods-price {
        color: #eb4350;
        &::before {
          content: "￥";
          font-size: 80%;
          margin-right: 5rpx;
        }
      }
    }
  }
}
// 底部操作栏
.bottom-bar {
  height: 80rpx;
  position: fixed;
  left: 0;
  right: 0;
  // --window-bottom    自带平台兼容，小程序是 0px，H5端是 tabBar 高度
  bottom: var(--window-bottom);

  border-top: 1px solid #ddd;
  background-color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20rpx;

  .select {
    .select-text {
      font-size: 24rpx;
      margin: 0 20rpx;
      color: #999;
    }
  }

  .total {
    flex: 1;
    display: flex;
    align-items: center;
    .total-name {
      font-size: 24rpx;
    }

    .total-price {
      color: var(--themeColor);
    }
  }

  .account {
    background-color: var(--themeColor);
    color: #fff;
    font-size: 22rpx;
    width: 150rpx;
    height: 52rpx;
    border: 1px solid #ccc;
    background-color: red;
    border-radius: 26rpx;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
</style>
